<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var typeArr = [];
      //数组里存放的是dd元素,dd元素本质就是一个对象

      //占位
      //在对象里添加一个自定义属性 showText = innerHTML
      //渲染的时候 根据是否有showText来判断你是否需要渲染型号
      //删除的时候 只删除showText里的内容就可以了
      typeArr = [
        { name: "dd", innerHTML: "黄金色", showText: "黄金色", k: 0 },
        { name: "dd", innerHTML: "16GB", showText: "16GB", k: 1 },
        { name: "dd", innerHTML: "公开版", showText: "", k: 2 },
        { name: "dd", innerHTML: "官方标配", showText: "官方标配", k: 3 },
      ];
    </script>
  </body>
</html>
